<?php
namespace App\Http\Controllers;
use App\Http\Repositories\AdminRepository;
use App\Http\Services\AdminService;
use App\Models\Admin;
use League\Fractal\Manager;
use League\Fractal\Resource\Collection;
use League\Fractal\Serializer\DataArraySerializer;
class TestController extends Controller
{
    protected $repository;
    public function __construct(AdminRepository $repository)
    {
        $this->repository = $repository;
    }
    public function login(AdminService $service)
    {
        //$service->test();

       // return Flower::test_rtn('key');
       // $list =  Admin::all();
/*
        $list2 = [
            [
                'id' => '1',
                'title' => 'Hogfather',
                'yr' => '1998',
                'author_name' => 'Philip K Dick',
                'author_email' => 'philip@example.org',
            ],
            [
                'id' => '2',
                'title' => 'Game Of Kill Everyone',
                'yr' => '2014',
                'author_name' => 'George R. R. Satan',
                'author_email' => 'george@example.org',
            ]
        ];
*/
     //   $fractal = new Manager();
        //$fractal->setSerializer(new DataArraySerializer());
     //   $resource = new Collection($list, function(Admin $item) {
         //   return [
              //  'id' => (int) $item['id'],
              //  'name'=>'2'
           // ];
        //},'booke');




       // $array = $fractal->createData($resource)->toArray();
       // return $array;
       // dd($array);
            //$oo = '555555';
       // tap('testwww',function($test)use($oo){
       //    echo $oo ;
       // });
    }
}